Repository navigation
feat: add QPACK and HTTP/3 frame fuzz targets - #392
Open
Franck-Sorel wants to merge 3 commits into
Open
Franck-Sorel wants to merge 3 commits into
Franck-Sorel wants to merge 3 commits into
Conversation
…ues; decouple qpack_decode split; add multi-frame seed
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the existing cargo-fuzz setup (which already had
fuzz_varint) with three targets (design indocs/FUZZING-PLAN.md):qpack_decode— feeds arbitrary bytes through the QPACK field-section decoder: both the stateless path the connection actually uses (decode_stateless) and the statefulDecoder(on_encoder_recv+decode_header).data[0]is reserved as the split byte so the encoder-instruction setup is decoupled from the field section.frame_parse— decodes a stream of HTTP/3 frames (Frame::<PayloadLen>::decode) from the input, with a zero-consumption guard. Exercises frame type/varint-length/payload parsing and truncation. Note: the frame-ordering rules (DATA-before-HEADERS →H3_FRAME_UNEXPECTED, etc.) live in the connection layer and are not reachable from this isolated codec target; that logic must be covered by tests separately.qpack_encode— synthesizes aHeaderFieldfrom the input (name lowercased; empty name/value reachable), encodes it, then round-trips throughdecode_statelessand asserts the fields match, so an encoder wire-output bug (e.g. the historical name-prefix bit-width error) is caught rather than silently ignored.Each target has a validated seed corpus.
Decodergetsimpl Defaultand a feature-gated re-export so the targets can reach it (default builds stay warning-free).Requires nightly +
cargo-fuzzto run (cargo +nightly fuzz run <target>). Verified on stable viacargo checkon the fuzz crate; an actual nightly fuzz campaign should run in CI.